<@override name="link">
<link href="${base}/resources/admin/css/plugins/iCheck/custom.css" rel="stylesheet">
</@override>
<@override name="body">
    <body class="gray-bg">
        <div class="col-sm-12">
            <div class="ibox">
                <div class="ibox-title">
                    <h5>权限列表</h5>
                    <div class="ibox-tools">
                        <a href="add.html" class="dropdown-toggle" title="添加权限">
                            <i class="fa fa-arrows"></i>
                        </a>
                    </div>
                </div>
                <div class="ibox-content">
                    <form action="index.html">
                        <div class="row">
                            <div class="col-sm-9 m-b-xs"></div>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input type="hidden" name="pageNumber" id="pageNumber" value="${pageable.pageNumber}">
                                    <input type="hidden" name="pageSize" id="pageSize" value="${pageable.pageSize}">
                                    <input type="text" placeholder="权限的名称" name="key" value="<#if key??>${key}</#if>" class="input-sm form-control">
                                    <input type="hidden" name="check" value="<#if check??>${check}</#if>">
                                    <span class="input-group-btn">
                                        <button type="submit" class="btn btn-sm btn-primary"> 搜索</button>
                                    </span>
                                </div>
                            </div>
                        </div>
                    </form>
                    <table class="table table-striped">
                        <thead>
                        <tr>
                            <#if check??>
                            <td></td>
                        </#if>
                        <td>编码</td>
                        <td>名称</td>
                        <td>说明</td>
                        <td>创建时间</td>
                        <td>操作</td>
                        </tr>
                        </thead>
                        <tbody>
                        <#list page.contents as role>
                        <tr>
                            <#if check??>
                            <td>
                                <div class="radio i-checks">
                                    <input type="radio" name="id" data-id="${role.id}" data-name="${role.name}">
                                </div>
                            </td>
                        </#if>
                        <td>${role.id}</td>
                        <td>${role.name}</td>
                        <td>${role.description}</td>
                        <td>
                            <#setting datetime_format="yyyy年MM月dd"/>
                            ${role.createTime?number_to_datetime}
                        </td>
                        <td>
                            <a href="javascript:;" title="编辑" class="btn btn-xs btn-primary" data-id="${role.id}">
                                <i class="fa fa-edit"></i>
                            </a>
                            <a href="javascript:;" title="删除" class="btn btn-xs btn-primary" data-id="${role.id}">
                                <i class="fa fa-times-circle"></i>
                            </a>
                        </td>
                        </tr>
                        </#list>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </body>
</@override>
<@override name="script">
<script type="text/javascript" src="${base}/resources/admin/js/plugins/iCheck/icheck.min.js"></script>
    <script type="text/javascript" src="${base}/resources/admin/js/role.js"></script>
    <script type="text/javascript">
        Common.checkbox();
        Role.index();
    </script>
</@override>
<@extends name="../base/main.html"/>